<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no" />
	<title>首页</title>
	<link rel="stylesheet" type="text/css" href="../c/aui.css" />
	<link rel="stylesheet" type="text/css" href="../c/fang.css" />
</head>

<body>
	<!-- <div class="f-slide"></div> -->
	<div id="sx-view"></div>
	<script id="sx-list" type="text/x-dot-template">
	{{ for(var i=0,it=it.data; i < it.length; i++) { }}
	<div class="f-list">
		<div class="h2"  tapmode onclick="_url({url:'fang_list',title:v.typeid.title+'列表',type:v.typeid.id,name_2:{{= it[i].id}}})">
			<div class="l">
				<em></em><span>{{= it[i].title}}</span>
			</div>
			<div class="r">更多<i class="aui-iconfont aui-icon-right"></i></div>
		</div>
		<div class="f-ul">
			{{ for(var i_s=0; i_s < it[i].list.length; i_s++) { }}
			<div class="li" tapmode onclick="_url({aid:{{= it[i].list[i_s].id }}},'fang_view_win')">
				<div class="img" style="height:{{= (li_w/3)+50 }}px">
					<img suxiangw-src="{{= _img(it[i].list[i_s].img,(li_w/3)+50,-1)}}" src="../i/loading_b.png" />
					{{? it[i].list[i_s].quanji == 1 }}
					<span class="a1">{{= it[i].list[i_s].url_len }}集全</span>
					{{?? it[i].list[i_s].quanji == 2 }}
					<span class="a1">更新至{{= it[i].list[i_s].url_len }}集</span>
					{{?? it[i].list[i_s].type == 1}}
					<!--<span class="a1">电影</span>-->
					{{?}}
				</div>
				<div class="content">
					<div class="title aui-ellipsis-1">{{= it[i].list[i_s].title }}</div>
					<!--<div class="text aui-ellipsis-1">{{= it[i].list[i_s].title_text ? it[i].list[i_s].title_text : it[i].list[i_s].content }}</div>-->
				</div>
			</div>
			{{ } }}
		</div>
	</div>
	{{ } }}
	</script>
</body>
<script type="text/javascript" src="../j/api.js"></script>
<script src="../j/jquery-3.3.1.min.js"></script>
<script type="text/javascript">
	var v,url;
	var li_w = $('#sx-view').width();
//	$('.img').css('height',(li_w/3)+50+'px');
	apiready = function() {
		urls();
		v = api.pageParam;
		url = 'fang/type/limit/2/name/2/id/'+v.typeid.id;
		_list({url:url});
		_shangla(function(ret,err){
			_list({url:url});
		},1)
		// 监听滚动
		api.addEventListener({
			name : 'scrolltobottom',
			extra : {threshold :300}
		}, function(ret, err) {
			if (heigutgao == 1) {
				pagenum += 1
				_list({url:url,page:pagenum});
			}
		});
	};
</script>

</html>
